<?php

  header("content-type:text/html;charset=utf-8");
  include "../config/mysql.php";
  session_start();
  if(isset($_SESSION['username'])){ 
  $id=$_POST["id"];
  $king=$_POST["king"];
  $explanation=$_POST["content"];
                 
     $tr=$pdo->exec("update article_kind set king='$king',explanation='$explanation' where id=$id");
     
                 if($tr){
                 	header("refresh:1;url=../index.php");
                 	print("修改成功,请稍后..<br>");
                 }
                 else{
                 	header("refresh:10;url=../changekid.php?id=$id");
                 	print("修改失败,请稍后..<br>");
                 }
}else{
  header("Location:../log.php");
      exit();
}




?>